#Set the working data
setwd("C:/Users/Wesley/Documents/Spring Senior/Metrics Seminar/Seminar Paper/Data")

## Load the final data
load("C:/Users/Wesley/Documents/Spring Senior/Metrics Seminar/Seminar Paper/Data/FinalData")

#Income, Log Income
summary(final.data$Income)
hist(final.data$Income)
hist(final.data$LogIncome)
sd(final.data$Income)

#Weeks worked
summary(final.data$Weekswrk)
sd(final.data$Weekswrk)
hist(final.data$Weekswrk)

#Hours worked
summary(final.data$Hrswrk)
sd(final.data$Hrswrk)
hist(final.data$Hrswrk)

#Female
table(final.data$Female)

#Queer
table(final.data$Queer)

#Nonwhite
table(final.data$Nonwhite)

#Degree status
n <- nrow(final.data)
Degree <- rep(NA, n)
Degree <- ifelse(final.data$Lesshs == 1, 1, Degree)
Degree <- ifelse(final.data$Hs == 1, 2, Degree)
Degree <- ifelse(final.data$Assoc == 1, 3, Degree)
Degree <- ifelse(final.data$Bach == 1, 4, Degree)
Degree <- ifelse(final.data$Grad == 1, 5, Degree)

table(Degree)
hist(Degree)

#Age
summary(final.data$Age)
sd(final.data$Age)
hist(final.data$Age)

#Experience
summary(final.data$Exper)
sd(final.data$Exper)
hist(final.data$Exper)

summary(final.data$Exper_sq)
sd(final.data$Exper_sq)
hist(final.data$Exper_sq)

#Married
table(final.data$Married)

#Metropolitan
table(final.data$Metro)

#Geograpic region
Region <- rep(NA, n)
Region <- ifelse(final.data$Northeast == 1, 1, Region )
Region <- ifelse(final.data$Midwest == 1, 2, Region )
Region <- ifelse(final.data$South == 1, 3, Region )
Region <- ifelse(final.data$West == 1, 4, Region )

table(Region)
hist(Region)


#Industry
Industry <- rep(0, n)
Industry <- ifelse(final.data$Person == 1, 1, Industry )
Industry <- ifelse(final.data$Prof == 1, 2, Industry )
Industry <- ifelse(final.data$Finance == 1, 3, Industry )
Industry <- ifelse(final.data$Trade == 1, 4, Industry )
Industry <- ifelse(final.data$Public == 1, 5, Industry )
Industry <- ifelse(final.data$Enter == 1, 6, Industry )
Industry <- ifelse(final.data$Trans == 1, 7, Industry )
Industry <- ifelse(final.data$Busi == 1, 8, Industry )
Industry <- ifelse(final.data$Manu == 1, 9, Industry )
Industry <- ifelse(final.data$Agri == 1, 10, Industry )
Industry <- ifelse(final.data$Mine == 1, 11, Industry )
Industry <- ifelse(final.data$Contruct == 1, 12, Industry )

table(Industry)
hist(Industry

#Occupation
Occ <- rep(0,n)
Occ <- ifelse(final.data$Manprof == 1, 1, Occ )
Occ <- ifelse(final.data$Service == 1, 2, Occ )
Occ <- ifelse(final.data$Office == 1, 3, Occ )
Occ <- ifelse(final.data$Natconst == 1, 4, Occ )
Occ <- ifelse(final.data$Prodlabor == 1, 5, Occ )

table(Occ)
hist(Occ)




